Skip to content

ref(layout): use Layout.Page on alerts#111642

Merged
priscilawebdev merged 2 commits intomasterfrom
JonasBa/ref/layout-page-alerts
Mar 27, 2026
Merged

ref(layout): use Layout.Page on alerts#111642
priscilawebdev merged 2 commits intomasterfrom
JonasBa/ref/layout-page-alerts

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Mar 26, 2026

Wraps non-compliant routes in the alerts area with Layout.Page.
Part of the Layout.Page audit remediation.

Changes

  • static/app/views/alerts/list/incidents/index.tsx — wrap renderBody() return and renderDisabled() in Layout.Page
  • static/app/views/alerts/list/rules/alertRulesList.tsx — wrap PageFiltersContainer block in Layout.Page
  • static/app/views/alerts/create.tsx — replace outer Fragment with Layout.Page
  • static/app/views/alerts/edit.tsx — replace outer Fragment with Layout.Page

Affected routes

Path Strategy
/organizations/:orgId/alerts/ leaf fix
/organizations/:orgId/alerts/rules/ leaf fix
/organizations/:orgId/alerts/:projectId/new/ leaf fix
/organizations/:orgId/alerts/crons-rules/:projectId/:monitorSlug/ leaf fix

Verification

  • Each route above loads in the browser and renders inside a <main> element

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 26, 2026
@priscilawebdev priscilawebdev marked this pull request as ready for review March 27, 2026 10:07
@priscilawebdev priscilawebdev requested a review from a team as a code owner March 27, 2026 10:07
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

</Layout.Side>
</Layout.Body>
</PageFiltersContainer>
</Layout.Page>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early returns missing Layout.Page wrapper

Low Severity

The main return path at line 385 is now wrapped in Layout.Page (rendering inside a <main> element), but the three early returns — loading state (lines 253–260), error state (lines 263–268), and missing project (lines 271–276) — are not wrapped. This causes the page layout structure to inconsistently switch between having and not having a <main> element depending on the component's data-fetching state, which can produce layout shifts when transitioning from loading to loaded.

Additional Locations (1)
Fix in Cursor Fix in Web

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a valid observation, but early returns for loading/error states are intentionally not wrapped in Layout.Page. This is consistent with other pages in the codebase (e.g., issues list, metric alert details, uptime details). The Layout.Page wrapper is only applied to the main content render path.

Wrap the issue alert rule details page with Layout.Page, consistent
with the other alert pages updated in the prior commit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@priscilawebdev priscilawebdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manually checked the changes and they look good.

@priscilawebdev priscilawebdev merged commit a9be7f5 into master Mar 27, 2026
70 checks passed
@priscilawebdev priscilawebdev deleted the JonasBa/ref/layout-page-alerts branch March 27, 2026 10:20
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants